<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/XGame_template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>XGame</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
<link type="text/css" rel="stylesheet" href="CSS/css.css" />
</head>

<body>
<div id="container">

<div id="wrapper">

<div id="banner">
<!-- InstanceBeginEditable name="TopLink" -->
<?php
include('lock.php');
$q = "SELECT user_name FROM user where user_ID = '$login_session'";
$result=mysql_query($q);
$data_fetch=mysql_fetch_array($result);
?>
<ul class="topLink">
<li> Welcome, <a href="UserProfile.php"> <?php echo $data_fetch['user_name']; ?> </a> </li>
<li> <a href="Wishlist.php"> Wishlist </a> &nbsp; | &nbsp;<a href="userShoppingCart.php"> Cart </a> </li>
<li> <a href="Logout.php"> Logout </a> </li>
</ul>
<!-- InstanceEndEditable -->

<img src="Assets/XGame.png" alt="XGame" />
</div>

<div id="menu">
<ul class="nav">
<form method="post" action="search_result.php">
<li> <span> <input type="text" placeholder="Search Keyword" name="search" />
&nbsp; <input type="submit" name="Search" value="Search" /> </span>
</li>
</form>
<li> <a href="Home.php"> Home </a> </li>
<li> <a href="ListOfNews.php"> News </a> </li>
<li> <a href="Games.php"> Games </a> </li>
<li> <a href="FAQ.php"> FAQ </a> </li>
<li> <a href="ContactUs.php"> Contact Us </a> </li>
</ul>

</div>

<div id="main">
<!-- InstanceBeginEditable name="Main" -->
<div class="verticalNav">
<h3> User Account </h3>
<ul>
<li> <a href="Wishlist.php"> Your Wishlist </a> </li>
<li> <a href="userShoppingCart.php"> Shopping Cart </a> </li>
<li> <a href="userCheckOutList.php"> Checkout List </a> </li>
<li> <a href="History.php"> History </a> </li>
</ul>
</div>

<div id="iframe">
<table border="0" class="table">
<tr align="center">
<th class="tableHeader"> Product ID </th>
<th class="tableHeader"> Product </th>
<th colspan="2" class="tableHeader"> Details </th>
<th class="tableHeader">&nbsp;   </th>
</tr>
<?php 
$sql = "SELECT * FROM wishlist where user_ID = '$login_session'";
$sql=mysql_query($sql);
while($row1=mysql_fetch_array($sql))
{
	$id = $row1['demo_ID'];
	$query=mysql_query("SELECT * FROM demo where demo_ID = '$id'");
	$row=mysql_fetch_array($query);
	echo"<tr align='center'>";
	echo"<td rowspan='3' class='tableHeader'>". $row['demo_ID'] ."</td>";
	$id = $row['demo_ID'];
	echo"<td rowspan='3' class='tableHeader'> <img src='display_photo.php?id=$id' width='90' height='80' style='padding:3px;'/> </td>";
	echo"<td class='tableContent'> Name </td>";
	echo"<td class='tableContent'>". $row['demo_name'] ."</td>";

?>
<td rowspan='3' class='tableHeader'>
<form name="add" action="WishlistSQL.php" method="POST">
<input type="hidden" name='direction' value="Wishlist.php"/>
<input type="hidden" name="ID" value="<?php echo $mysql="INSERT INTO cart (demo_ID,user_ID) VALUES ($id,$login_session)"; ?>"/>
<input type="submit" name="add" value="Add to Cart"/>
</form> 
<br />
<form name="remove" action="WishlistSQL.php" method="POST">
<input type="hidden" name='direction' value="Wishlist.php"/>
<input type="hidden" name="ID" value="<?php echo $mysql="DELETE FROM wishlist WHERE wish_ID=".$row1['wish_ID'].""; ?>"/>
<input type="submit" name="remove" value="Remove"/>
</form> 
</td>

<?php
echo"</tr>";
echo"<tr align='center'>";
echo"<td class='tableContent'> Description </td>";
echo"<td class='tableContent'>". $row['demo_desc'] ."</td>";
echo"</tr>";
echo"<tr align='center'>";
echo"<td class='tableHeader'> Unit Price </td>";
echo"<td class='tableHeader'>". $row['demo_price'] ."</td>";
echo"</tr>";
}
?>
</table>
</div>
<!-- InstanceEndEditable -->
</div>

<div id="footer">
<p align="center"> &copy; &nbsp; 2012 XGame </p>
</div>

</div>

</div>

</body>
<!-- InstanceEnd --></html>
